<template>
  <a-card :bordered="false" class="card_top_padding" style="margin-bottom: 11px">
    <a-tabs
      @change="
        (val) => {
          $router.push({ name: val })
        }
      "
      :activeKey="currentRoute"
    >
      <a-tab-pane :key="item.key" :tab="item.name" v-for="item in tabList"> </a-tab-pane>
    </a-tabs>
    <slot></slot>
  </a-card>
</template>

<script>
export default {
  props: {
    tabList:{
      type:Array,
      default:() => {
        return []
      }
    }
  },
  data() {
    return {}
  },
  computed: {
      currentRoute() {
          return this.$route.name
      }
  }
}
</script>

<style lang="scss" scoped>
</style>